﻿namespace PLCS.SocialHttpApi.Models;

public class MeasurementData
{
    public string ApiUuid { get; set; }
    public string Timestamp { get; set; }
    public string SyncDate { get; set; }
    public string CoilSn { get; set; }
    public string OutsideLengthResult { get; set; }
    public string OutsideLengthOffset { get; set; }
    public bool OutsideLengthQualified { get; set; }
    public string OutsideWidthResult { get; set; }
    public string OutsideWidthOffset { get; set; }
    public bool OutsideWidthQualified { get; set; }
    public string InsideLengthResult { get; set; }
    public string InsideLengthOffset { get; set; }
    public bool InsideLengthQualified { get; set; }
    public string InsideWidthResult { get; set; }
    public string InsideWidthOffset { get; set; }
    public bool InsideWidthQualified { get; set; }
    public string HeightResult { get; set; }
    public string HeightOffset { get; set; }
    public bool HeightQualified { get; set; }
}

public class FansResponseData
{
    public string ApiUuid { get; set; }
    public string Message { get; set; }
    public string Status { get; set; }
    public string Timestamp { get; set; }
    public string SyncDate { get; set; }

    public FansResponseData(string apiUuid)
    {
        ApiUuid = apiUuid;
        Message = "成功";
        Status = "Y";
        Timestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();
        SyncDate = DateTime.Now.ToString();
    }

    public FansResponseData(string apiUuid, string message)
    {
        ApiUuid = apiUuid;
        Message = message;
        Status = "N";
        Timestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();
        SyncDate = DateTime.Now.ToString();
    }
}